import type { IActivityListResData } from "../activity/types";
import type { ProductListResult } from "../card/types";
import type { BannerResult, HomeTabResult } from "../dynamicAllocation/types";
import type { PhotoAlbumListResult } from "../photoAlbum/types";

/**
 * @description 链接类型 0:图文 1: 公众号链接 2:文件
 * @date 02/09/2024
 * @export
 * @enum {number}
 */
export enum InformationLinkTypeEnum {
  /** 图文 */
  TEXT = 0,
  /** 公众号链接 */
  LINK = 1,
  /** 文件 */
  FILE = 2
}

export interface InformationPageListResData {
  coverUrl: string;
  createBy: number;
  createTime: string;
  deleted: boolean;
  details: string;
  id: number;
  module: string;
  moduleSub: string;
  num: number;
  showBrowseNum: number;
  subtitle: string;
  tenantId: number;
  title: string;
  updateBy: number;
  updateTime: string;
  /** 链接类型 0:图文 1: 公众号链接 2:文件 */
  linkType: InformationLinkTypeEnum;
  /** 需要展示的链接 */
  linkUrl: string;
  publicTime: string
  /** 有没有权限(0 :没有 1:有) */
  havePermission: 0 | 1
  /** 文件地址 */
  fileUrl: string | null
}

export interface HomeDataResult {
  bannerInfo: BannerResult[]
  diamondRegionInfo: HomeTabResult[]
  groupConfigInfo: HomeTabResult[]
  activityInfo: IActivityListResData
  photoAlbumInfo: PhotoAlbumListResult[]
  // 专享福利
  memberBenefitsInfo: ProductListResult[]
}